package com.hs.core;/*
 *@author:guozhijiang
 *@create:2021-03-29 14:18
 */

import java.util.Scanner;

import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent;
import uk.co.caprica.vlcj.discovery.NativeDiscovery;

public class VedioPlayer implements Runnable{

    private final EmbeddedMediaPlayerComponent mediaPlayerComponent;//播放器
    public VedioPlayer(String stream){
        mediaPlayerComponent = new EmbeddedMediaPlayerComponent();//播放器实例化
        new MainFram(mediaPlayerComponent,stream);
    }

    public void run() {

    }

    public static void main(final String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("please enter stream address:");
        String str = input.next();//控制台输入地址
        final String address =str.substring(1);
        new NativeDiscovery().discover();
        new VedioPlayer(address);


        /*SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                new VedioPlayer("C:\\Users\\guo\\Desktop\\111\\111.mp4");
            }
        });*/
    }

}
